//
//  ZBAppManager+weex.m
//  XZBProduct
//
//  Created by xzb on 2018/10/10.
//  Copyright © 2018 xzb. All rights reserved.
//

#import "ZBAppManager+weex.h"
//#import "YHImageLoader.h"
//#import "YHEventHandler.h"

@implementation ZBAppManager (weex)

- (void)initWeexSDK
{
    /*
     //    [WXDevTool setDebug:YES];
     //business configuration
     
     //获取工程中文件的路径 放置.app文件夹里
     NSString*filePath = [[NSBundle mainBundle]pathForResource:@"weex"ofType:@"js"];
     
     NSError* error;
     
     NSString *toPath = [NSHomeDirectory() stringByAppendingFormat:@"cache/weex.js"];
     //copy一份文件到另一个地方
     if([[NSFileManager defaultManager] copyItemAtPath:filePath toPath:toPath error:&error]) {
     NSLog(@"copy成功");
     };
     
     Log(@"path:%@",toPath);
     
     [WXAppConfiguration setAppGroup:@"AliApp"];
     [WXAppConfiguration setAppName:@"WeexDemo"];
     [WXAppConfiguration setAppVersion:@"1.0.0"];
     
     //init sdk enviroment
     [WXSDKEngine initSDKEnvironment];
     //注册网络图片加载器
     [WXSDKEngine registerHandler:[YHImageLoader new] withProtocol:@protocol(WXImgLoaderProtocol)];
     //注册事件处理
     
     [WXSDKEngine registerHandler:[YHEventHandler new] withProtocol:@protocol(WXEventModuleProtocol)];
     //    [WXSDKEngine registerModule:@"event" withClass:[YHEventHandler class]];
     
     //set the log level
     [WXLog setLogLevel:WXLogLevelAll];
     */
}

@end
